//import com.icehand.axon.demo.command.aggregates.BankAccount;
//import lombok.extern.slf4j.Slf4j;
//import org.axonframework.commandhandling.model.GenericJpaRepository;
//import org.axonframework.commandhandling.model.Repository;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
////package com.icehand.axon.demo.config;
////
////import com.icehand.axon.demo.command.aggregates.BankAccount;
////import lombok.extern.slf4j.Slf4j;
////import org.axonframework.commandhandling.CommandBus;
////import org.axonframework.commandhandling.SimpleCommandBus;
////import org.axonframework.commandhandling.model.GenericJpaRepository;
////import org.axonframework.commandhandling.model.Repository;
////import org.axonframework.common.jpa.ContainerManagedEntityManagerProvider;
////import org.axonframework.common.jpa.EntityManagerProvider;
////import org.axonframework.common.transaction.TransactionManager;
////import org.axonframework.eventhandling.EventBus;
////import org.axonframework.eventhandling.SimpleEventBus;
////import org.axonframework.eventsourcing.eventstore.EventStorageEngine;
////import org.axonframework.eventsourcing.eventstore.inmemory.InMemoryEventStorageEngine;
////import org.axonframework.messaging.interceptors.TransactionManagingInterceptor;
////import org.axonframework.monitoring.NoOpMessageMonitor;
////import org.axonframework.spring.config.EnableAxon;
////import org.axonframework.spring.messaging.unitofwork.SpringTransactionManager;
////import org.springframework.beans.factory.annotation.Autowired;
////import org.springframework.context.annotation.Bean;
////import org.springframework.context.annotation.Configuration;
////import org.springframework.transaction.PlatformTransactionManager;
////
////
/////**
//// * @author icehand
//// */
//@Configuration
////@EnableAxon
//@Slf4j
//public class DemoConfiguration {
////
////    @Autowired
////    private PlatformTransactionManager transactionManager;
////
////    @Bean
////    public EventStorageEngine eventStorageEngine(){
////        return new InMemoryEventStorageEngine();
////    }
////
////    @Bean
////    public TransactionManager axonTransactionManager() {
////        return new SpringTransactionManager(transactionManager);
////    }
////
////    @Bean
////    public EventBus eventBus(){
////        return new SimpleEventBus();
////    }
////
////    @Bean
////    public CommandBus commandBus(TransactionManager axonTransactionManager) {
////        return SimpleCommandBus.builder()
////                .transactionManager(axonTransactionManager)
////                .messageMonitor(NoOpMessageMonitor.INSTANCE)
////                .build();
////    }
////
////    @Bean
////    public TransactionManagingInterceptor transactionManagingInterceptor(){
////        return new TransactionManagingInterceptor(new SpringTransactionManager(transactionManager));
////    }
////
////    @Bean
////	public EntityManagerProvider entityManagerProvider() {
////		return new ContainerManagedEntityManagerProvider();
////	}
////
//
//	@Bean
//    public Repository<BankAccount> accountRepository(){
//        return new GenericJpaRepository<>(entityManagerProvider(), BankAccount.class, eventBus());
//    }
//
//}